using SqlSugar;
using Domain;

namespace Infrastructure.Data
{
    public class SqlSugarInitializer
    {
        private readonly ISqlSugarClient _db;

        public SqlSugarInitializer(ISqlSugarClient db)
        {
            _db = db;
        }

        public void Initialize()
        {
            // 检查并创建数据库表
            _db.CodeFirst.InitTables(
                typeof(ApprovalHistory),
                typeof(Customer),
             
                typeof(Workflow),
                typeof(WorkflowHistory),
                typeof(WorkflowStep)
            );
        }
    }
}